# 初始化的函数

def a() -> object:
    judge = input('输入你的选择:')
    judge_arg = judge.upper()
    if judge_arg == 'A':  # 新建
        name = input(r'Please input the file name:')
        file = open('D:/practice/{}.txt'.format(name), 'w', encoding='utf8')
        print('The new file complete.')
    elif judge_arg == 'B':
        old_name = open("d:/practice/old_name.txt", 'r', encoding='utf8').read()
        if  old_name == '':
            print('您这是第一次使用,请选择A')
            a()
        else:
            print(old_name)

    else:
        print('Your enter is wrong')
        a()


a()
